/**
 * 
 */
package com.primestone.cim.executemeterreadschedules;

import java.io.Serializable;
import java.util.Date;

/**
 * @author cesar.mateus
 *
 */
public class ScheduleOperationResult implements Serializable {

	private static final long serialVersionUID = -3334380654946762852L;
	
	private String idDevice;
	private Date dateTime; // YYYYMMDD HH:MI
	private Integer period; // 0 none, 1 minute, 2 hour, 3 day , 4 week, 5 month
	private Integer retries;
	private Integer retryTime;
	private Integer frequency;
	private Boolean isLP;
	private Boolean isRG;
	private Boolean isEV;
	private Boolean isSaved;
	private String message;
	
	
	public ScheduleOperationResult(){}


	/**
	 * 
	 * @param idDevice
	 * @param dateTime
	 * @param period
	 * @param retries
	 * @param retryTime
	 * @param frequency
	 * @param isLP
	 * @param isRG
	 * @param isEV
	 * @param isSaved
	 * @param message
	 */
	public ScheduleOperationResult(String idDevice, Date dateTime,
			Integer period, Integer retries, Integer retryTime,
			Integer frequency, Boolean isLP, Boolean isRG, Boolean isEV, Boolean isSaved, String message) {
		super();
		this.idDevice = idDevice;
		this.dateTime = dateTime;
		this.period = period;
		this.retries = retries;
		this.retryTime = retryTime;
		this.frequency = frequency;
		this.isLP = isLP;
		this.isRG = isRG;
		this.isEV = isEV;
		this.isSaved = isSaved;
		this.message = message;
	}
	
	/**
	 * 
	 * @param schedule
	 */
	public ScheduleOperationResult(ScheduleOperationResult schedule) {
		this(
		schedule.getIdDevice(),
		schedule.getDateTime(),
		schedule.getPeriod(),
		schedule.getRetries(),
		schedule.getRetryTime(),
		schedule.getFrequency(),
		schedule.getIsLP(),
		schedule.getIsRG(),
		schedule.getIsEV(),
		schedule.getIsSaved(),
		schedule.getMessage()
		);
	}


	/**
	 * @return the idDevice
	 */
	public String getIdDevice() {
		return idDevice;
	}


	/**
	 * @param idDevice the idDevice to set
	 */
	public void setIdDevice(String idDevice) {
		this.idDevice = idDevice;
	}


	/**
	 * @return the dateTime
	 */
	public Date getDateTime() {
		return dateTime;
	}


	/**
	 * @param dateTime the dateTime to set
	 */
	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}


	/**
	 * @return the period
	 */
	public Integer getPeriod() {
		return period;
	}


	/**
	 * @param period the period to set
	 */
	public void setPeriod(Integer period) {
		this.period = period;
	}


	/**
	 * @return the retries
	 */
	public Integer getRetries() {
		return retries;
	}


	/**
	 * @param retries the retries to set
	 */
	public void setRetries(Integer retries) {
		this.retries = retries;
	}


	/**
	 * @return the retryTime
	 */
	public Integer getRetryTime() {
		return retryTime;
	}


	/**
	 * @param retryTime the retryTime to set
	 */
	public void setRetryTime(Integer retryTime) {
		this.retryTime = retryTime;
	}


	/**
	 * @return the frequency
	 */
	public Integer getFrequency() {
		return frequency;
	}


	/**
	 * @param frequency the frequency to set
	 */
	public void setFrequency(Integer frequency) {
		this.frequency = frequency;
	}


	/**
	 * @return the isLP
	 */
	public Boolean getIsLP() {
		return isLP;
	}


	/**
	 * @param isLP the isLP to set
	 */
	public void setIsLP(Boolean isLP) {
		this.isLP = isLP;
	}


	/**
	 * @return the isRG
	 */
	public Boolean getIsRG() {
		return isRG;
	}


	/**
	 * @param isRG the isRG to set
	 */
	public void setIsRG(Boolean isRG) {
		this.isRG = isRG;
	}


	/**
	 * @return the isEV
	 */
	public Boolean getIsEV() {
		return isEV;
	}


	/**
	 * @param isEV the isEV to set
	 */
	public void setIsEV(Boolean isEV) {
		this.isEV = isEV;
	}


	/**
	 * @return the isSaved
	 */
	public Boolean getIsSaved() {
		return isSaved;
	}


	/**
	 * @param isSaved the isSaved to set
	 */
	public void setIsSaved(Boolean isSaved) {
		this.isSaved = isSaved;
	}


	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}


	/**
	 * @param message the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}


	/**
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("ScheduleOperationResult [");
		if (idDevice != null)
			builder.append("idDevice=").append(idDevice).append(", ");
		if (dateTime != null)
			builder.append("dateTime=").append(dateTime).append(", ");
		if (period != null)
			builder.append("period=").append(period).append(", ");
		if (retries != null)
			builder.append("retries=").append(retries).append(", ");
		if (retryTime != null)
			builder.append("retryTime=").append(retryTime).append(", ");
		if (frequency != null)
			builder.append("frequency=").append(frequency).append(", ");
		if (isLP != null)
			builder.append("isLP=").append(isLP).append(", ");
		if (isRG != null)
			builder.append("isRG=").append(isRG).append(", ");
		if (isEV != null)
			builder.append("isEV=").append(isEV).append(", ");
		if (isSaved != null)
			builder.append("isSaved=").append(isSaved).append(", ");
		if (message != null)
			builder.append("message=").append(message);
		builder.append("]");
		return builder.toString();
	}
	
	

}
